﻿@model EnetaMvc.Web.Models.ArticleDetailsModel
@using System.Configuration
@{
    ViewBag.Title = Model.Article.Title;
    Layout = "~/Views/Shared/_NewsLayout.cshtml";
}

<div class="blog-head">
	<div class="blog-head-txt">
		<h2 style="float: left"><a href="@Url.Content("~/news/articles/")">@Resources.EnetaMvc.Articles</a></h2>
	</div>
</div>

<div class="comentaries-area">
	<div class="user-info">
		<div class="blog-foto"> <a href="@Url.Content("~/profiles/details/" + Model.Article.CreatedById)"><img alt="@Model.Article.CreatedByUserName" src="@Html.GetProfileUrl(Model.Article.CreatedById)" width="32" height="32" /></a> </div>
		<div class="user-main"> <a href="@Url.Content("~/profiles/details/" + Model.Article.CreatedById)">@Model.Article.CreatedByUserName</a> <span>@Model.Article.Created.ToShortDateString()</span> </div>
	</div>
	<h2><a href="@Request.RawUrl">@Model.Article.Title</a></h2>

    <p>@Html.Raw(Model.Article.Body)</p>

    @Html.TagsForList(Model.Article.Tags, true)

    @if(User.IsInRole("Administrator"))
    {
        <p>&nbsp;</p>
        <form action="@Url.Action("ContentAction", new { id = Model.Article.Id })" method="get">
        @Html.Partial("_TagEditor", Model.Article.Tags)
      
        <div class="enter-information">
            <fieldset>
                <div class="info-row">
                    <div class="title">
                        <h5>@Resources.EnetaMvc.PublishState</h5>
                    </div>
                    <div class="information-main">
                        <span>@Model.Article.PublishStateName</span>
                    </div>
                </div>
                <div class="info-row">
                    <div class="title">
                        <h5>Keeldumise põhjus</h5>
                    </div>
                    <div class="information-main">
                        <textarea rows="5" cols="20" name="comment"></textarea>
                    </div>
                </div>
                <div class="submit">
                    <input type="submit" value="@Resources.EnetaMvc.Reject" name="actionName" />
                    <input type="submit" value="@Resources.EnetaMvc.Approve" name="actionName" />
                    <input type="submit" value="@Resources.EnetaMvc.Edit" name="actionName" />
                </div>
            </fieldset>
        </div>
        </form>
        <p>&nbsp;</p>
    }

    @*<ul class="tags">
		<li><a href="#">äri</a>,</li>
		<li><a href="#">ettevõtlus</a>,</li>
		<li><a href="#">sündmus</a>,</li>
		<li><a href="#">haridus</a>,</li>
		<li><a href="#">BizTalk</a></li>
	</ul>*@
	
    @{ Html.RenderPartial("_Comments", Model.Article.Comments); }
</div>

@{ Html.RenderPartial("_AddComment", Model.Article.Id); }

<div class="lisa-kommentar">
    @if(Session["UserId"] != null)
    {
	<div class="slide-box logged-in">
		<div class="slide-box-center">
			<div class="slide-box-bottom"> <a class="close" href="#">close</a>
				<div>
					<p>Lembit, <a href="#">kirjuta uudis</a> või <a href="#">lisa oma blogi</a>.</p>
				</div>
			</div>
		</div>
	</div>
    
	<ul id="profile-nav" class="bottom">
		<li> <span class="open-submenu">&nbsp;</span> <a href="#">Lisa uudis</a>
			<div>
				<ul>
					<li><a href="#">Lisa ajakiri</a></li>
					<li><a href="#">Lisa raamat</a></li>
					<li><a href="#">Lisa blogi</a></li>
					<li><a href="#">Lisa firma</a></li>
				</ul>
			</div>
		</li>
	</ul>
    }
    else 
    {
        
    }
</div>

<div class="blogs-menu">
	<ul>
		<li><a href="@Url.Content("~/")">@ConfigurationManager.AppSettings["PortalName"]</a></li>
        <li>@Resources.EnetaMvc.News</li>
        <li><a href="@Url.Content("~/news/articles/")">@Resources.EnetaMvc.Articles</a></li>		
	</ul>
</div>